package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * 日志表
 */
@Entity
@Table(name = "culog", schema = "springboot", catalog = "")
public class Culog {
    private int culId;              //日志id
    private String culTitle;        //日志标题
    private String culOutline;      //内容概要
    private String culStatus;       //点评状态
    private Timestamp culTime;      //创建时间
    private Integer culName;        //类型
    private Integer culDelete;      //逻辑删除
    private Emp empByEmployeesId;   //提交人
    private List<Reply> replyByCulId;

    public Culog() {
    }

    @Id
    @Column(name = "cul_id")
    public int getCulId() {
        return culId;
    }

    public void setCulId(int culId) {
        this.culId = culId;
    }

    @Basic
    @Column(name = "cul_title")
    public String getCulTitle() {
        return culTitle;
    }

    public void setCulTitle(String culTitle) {
        this.culTitle = culTitle;
    }

    @Basic
    @Column(name = "cul_outline")
    public String getCulOutline() {
        return culOutline;
    }

    public void setCulOutline(String culOutline) {
        this.culOutline = culOutline;
    }

    @Basic
    @Column(name = "cul_status")
    public String getCulStatus() {
        return culStatus;
    }

    public void setCulStatus(String culStatus) {
        this.culStatus = culStatus;
    }

    @Basic
    @Column(name = "cul_time")
    public Timestamp getCulTime() {
        return culTime;
    }

    public void setCulTime(Timestamp culTime) {
        this.culTime = culTime;
    }

    @Basic
    @Column(name = "cul_name")
    public Integer getCulName() {
        return culName;
    }

    public void setCulName(Integer culName) {
        this.culName = culName;
    }

    @Basic
    @Column(name = "cul_delete")
    public Integer getCulDelete() {
        return culDelete;
    }

    public void setCulDelete(Integer culDelete) {
        this.culDelete = culDelete;
    }

    @ManyToOne
    @JoinColumn(name = "employees_id", referencedColumnName = "employees_id")
    public Emp getEmpByEmployeesId() {
        return empByEmployeesId;
    }

    public void setEmpByEmployeesId(Emp empByEmployeesId) {
        this.empByEmployeesId = empByEmployeesId;
    }

    @OneToMany(mappedBy= "culogByCulId")
    public List<Reply> getReplyByCulId() {
        return replyByCulId;
    }

    public void setReplyByCulId(List<Reply> replyByCulId) {
        this.replyByCulId = replyByCulId;
    }

    @Override
    public String toString() {
        return "Culog{" +
                "culId=" + culId +
                ", culTitle='" + culTitle + '\'' +
                ", culOutline='" + culOutline + '\'' +
                ", culStatus='" + culStatus + '\'' +
                ", culTime=" + culTime +
                ", culName=" + culName +
                ", culDelete=" + culDelete +
                '}';
    }
}
